package com.ktjiaoyu.server.controller;


import com.ktjiaoyu.server.domain.pojo.Menu;
import com.ktjiaoyu.server.service.MenuService;
import com.ktjiaoyu.server.utils.ResponseResult;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class MenuController {


    @Resource
    private MenuService menuService;


    @GetMapping("/menu")
    public ResponseResult getMenusByAdminId() {
        List<Menu> list = menuService.getMenusByAdminId();
        return ResponseResult.success(list);
    }




}
